package mailsystem.states;

import mailsystem.Connection;
import mailsystem.TelephoneResources;

public class ChangeNameStatus implements State {

	@Override
	public void runAction(Connection c, String key) {
		if (key.equals("#")) {
			c.getCurrentMailbox().setName(c.getCurrentRecording());			
			c.setCurrentRecording("");
			c.setState(Connection.MAILBOXMENU);			
			c.showDisplayAllPhones(TelephoneResources.MAILBOX_MENU_TEXT);			
		}
	}

}
